package com.tianquan.xxljob;/**
 * @author starsea
 * @date 2024-10-22 下午4:21
 */

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.stereotype.Component;

/**
 * @BelongsProject: uploaddemo
 * @BelongsPackage: com.tianquan.xxljob
 * @Author: tianquan
 * @CreateTime: 2024-10-22  16:21
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class TestXxlJobHandler {

    int a = 1;

    /**
     * 更新状态
     **/
    @XxlJob("UpdateStatus")
    public void updateStatus() {
        String jobParam = XxlJobHelper.getJobParam();
        System.out.println(a++);
        System.out.println("任务执行" + jobParam);
    }


}
